<template>
    <div>
        <form action="/signup" method="POST" @submit.prevent="sendSignup">
            <fieldset>
                <legend>免费注册账号</legend>
                <div>
                    <label for="email">邮箱：</label>
                    <input type="email" name="email" id="email" v-model="sign.email">
                </div>
                <div>
                    <label for="name">昵称：</label>
                    <input type="text" name="name" id="name" v-model="sign.name">
                </div>
                <div>
                    <label for="password">密码：</label>
                    <input type="password" name="password" id="password" v-model="sign.password">
                </div>
                <br>
                <input type="submit" value="创建您的帐号">
            </fieldset>
            
        </form>
    </div>
</template>

<script>
export default {
    name:"SignUpForm",
    data() {
        return {
            sign: {
              email: "",
                name: "游客",
                password: ""  
            }
        }
    },
    methods: {
        sendSignup: function() {
            console.log(this.sign)
        }
    }
}
</script>